package com.ytjj.quartz.dao;

import com.ytjj.qmyx.mall.model.DataAnalyse;
import com.ytjj.qmyx.mall.model.DataModelAnalyse;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 *
 * @version 1.0
 *
 */
public interface DataAnalyseDao {


    /**
     * 查询数据
     * @param createDate
     */
    DataAnalyse queryDataAnalyseByCreateDate(@Param("createDate") String createDate,
                                             @Param("channel") String channel);

    /**
     * 查询页面重定向数
     * @param channel
     * @param startDate
     * @param endDate
     */
    int countRedirectByChannel(@Param("channel") String channel,
                               @Param("startDate") String startDate,
                               @Param("endDate") String endDate,
                               @Param("platform") String platform);

    /**
     * 总uv
     * @param channel
     * @param startDate
     * @param endDate
     * @param pathCode
     * @return
     */
    Integer countSum(@Param("channel") String channel,
                     @Param("startDate") String startDate,
                     @Param("endDate") String endDate,
                     @Param("pathCode") String pathCode,
                     @Param("platform") String platform);

    /**
     * 订单数
     * @param channel
     * @param startDate
     * @param endDate
     * @return
     */
    Integer countOrderNum(@Param("channel") String channel,
                          @Param("startDate") String startDate,
                          @Param("endDate") String endDate,
                          @Param("model") String model,
                          @Param("platform") String platform);

    /**
     * 未填地址
     * @param channel
     * @param startDate
     * @param endDate
     * @return
     */
    Integer countNoAddressOrder(@Param("channel") String channel,
                                @Param("startDate") String startDate,
                                @Param("endDate") String endDate,
                                @Param("model") String model,
                                @Param("platform") String platform);

    /**
     * 支付订单数
     * @param channel
     * @param startDate
     * @param endDate
     * @return
     */
    Integer countPayOrderNum(@Param("channel") String channel,
                             @Param("startDate") String startDate,
                             @Param("endDate") String endDate,
                             @Param("model") String model,
                             @Param("platform") String platform);

    /**
     * 查询数据
     * @param channel
     * @param model
     * @param createDate
     * @return
     */
    DataModelAnalyse queryDataModelAnalyseByCreateDate(@Param("channel") String channel,
                                                       @Param("model") String model,
                                                       @Param("createDate") String createDate);
}
